package tt.dz.egobus.servicemanager.service;

import tt.dz.egobus.servicemanager.entities.DriverRegisterBusRelative;

import java.util.List;

/**
 * @author Anson
 * @date 17-8-16
 * @name 抢单的司机关系管理
 * @since 1.0.6
 */
public interface GrabDriverRegisterBusRelativeService extends DriverRegisterBusRelativeService {

    /**
     * @param relative 司机关系
     * @author Anson
     * @date 17-8-16
     * @name 设置当前司机从激活到抢单状态控制
     * @since 1.0.6
     */
    boolean doBusinessGrab(DriverRegisterBusRelative relative);

    /**
     * @param relative 司机关系
     * @author Anson
     * @date 17-8-16
     * @name 司机放弃抢单状态
     * @since 1.0.6
     */
    boolean giveUpDriverBusinessGrab(DriverRegisterBusRelative relative);


    /**
     * @param relative 当前关系
     * @author Anson
     * @date 17-8-30
     * @name 司机预约抢单成功
     * @since 1.0.7
     */
    boolean doBespeakGrabBusinessSuccess(DriverRegisterBusRelative relative);

    /**
     * @param relative
     * @author Anson
     * @date 17-8-31
     * @name 司机取消了行程, 则转换状态为开始状态
     * @since 1.0.7
     */
    boolean driverCancelBusiness(DriverRegisterBusRelative relative);

    /**
     * @param needHandlerDriverDbStatusActive 当前需要转换到激活的状态的司机
     * @author Anson
     * @date 17-9-8
     * @name 修改当前抢单结束, 但需要修改当前司机抢单状态为激活的状态
     * @since 1.0.7
     */
    int terminalBusinessDriverStatus(List<String> needHandlerDriverDbStatusActive);
}
